{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Data Augmentation\n",
    "\n",
    "### Let's look at our untouched dataset"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAVEAAAD8CAYAAADOg5fGAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4wLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvqOYd8AAAIABJREFUeJzt3Xu8VXP+x/HXR0hUKkySS7lNQu7E9EgzyiWXXEY0hYyRh3seGA1+hnELMx6Tu5BCj4mZqBhNGiL3KaZ50IViRJQQSqiJ7++Ps79rr13nsvdZe6+11zrv5+PR46z9XWuf9Tn7c86371rrezHnHCIi0jjrJR2AiEiaqRIVEYlAlaiISASqREVEIlAlKiISgSpREZEIVImKiEQQqRI1s8PN7B0zW2Bmw8oVlCRLec0u5bb8rLGd7c2sGfAu0AdYBMwABjjn5pQvPImb8ppdym1lrB/hvfsDC5xz7wOY2TigH1BnQsysqQ+P+tw5t0XSQTRAeS1dGvIKJeZWeS0ur1Eu5zsCH4VeL8qVSd0WJh1AEZTX0qUhr6DclqqovEZpiRbFzIYAQyp9HomX8ppNymvpolSiHwPbhF5vnSsr4JwbCYwEXR6khPKaXQ3mVnktXZTL+RnATmbW2cw2BE4GJpUnLEmQ8ppdym0FNLol6pxbY2bnAVOAZsAo59zsskUmiVBes0u5rYxGd3Fq1Ml0efCGc27fpIMoN+VVec2oovKqEUsiIhGoEhURiaDiXZxE4rLPPvsE2+eddx4Ap556KgAPPfQQALfffntwzJtvvhljdJJVaomKiESQ2QdLzZo1C7Y33XTTOo/zLZaNN94YgJ/+9KcAnHvuucExf/zjHwEYMGAAAN9//32wb/jw4QBcc801xYSlBxAVsOeeewLw3HPPBWWtW7eu9divv/462N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H/xY466igAPv300/gCkwInnXQSACNGjAjKNt98cyDfUnn++eeDfb7ryy233FLwfcKtGn/MySefXP6ApVabbropADfddBOQz2u4G9Pa5s+fH2wfdthhAGywwQZA/u/U/y6svR0HtURFRCJosBI1s1FmttTM3g6VtTOzqWY2P/e1bWXDlHJTXrNLuY1XMZfzo4E7gIdCZcOAZ51zw3PLrg4DLit/eJURfrjw4IMPAvnLDC98GbhwYVqW0CnJaKo4r+uvX/Orue++NTOR3XfffQBsvPHGwTHTp08H4NprrwXgpZdeCvY1b94cgMceewyAQw89dJ1zzJw5s9xhV4vRVGlujzuuZpWg3/zmNw0e+9577wHQp0+foMw/WNpxxx0rEF3jNNgSdc5NB5atVdwPGJPbHgMcW+a4pMKU1+xSbuPV2AdL7Z1zi3PbS4D2ZYonFqeddlqwvdVWWxXs8w8nHnroIZqgqsmr7750//33F5RPnTo12PYPJZYvL1hmvGDf2i3QRYsWBdtjxoyhCamK3J544om1ln/wwQfB9owZM4B8Z3vf+gzzXZuqQeSn8845V98M2FqCNZ2U1+yqL7fKa+kaW4l+amYdnHOLzawDsLSuA51zI4GRkPxyA77rw69//eugzA/v/OqrrwC47rrr4g+seiSaV39vE+Dyyy/35wHyHaj9LFtQewvUu+KKK2otDw8J/OyzzxofbPoUldtK/72eeeaZAAwZUlNPP/PMMwAsWLAgOGbp0jp/7QLt21fPxW9juzhNAvw18WnAxPKEIwlTXrNLua2QBluiZvYXoBewuZktAn4PDAceM7MzgIVA/7q/Q/L8hAbjx4+v85jbb78dgGnTpsURUuKqKa9XXXUVkG99AqxevRqAKVOmAPn7Y99999067/dDdcP3P7fddlsg37neX2FMnJj9uqOacrs2P/z26quvjvR9wpOSJK3BStQ5N6COXYeUORaJkfKaXcptvDRiSUQkgiYxdv7www8HoFu3buvse/bZZ4HCMdkSjzZt2gBwzjnnAIXztfrL+GOPrbs7o+9wPXbsWAD22WefdY7529/+BsDNN99choglDv7h3yabbFLnMbvvvnvB61deeSXYfvXVVysTWB3UEhURiS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MbI6ZzTazC3Pl7cxsqpnNz31tm3Ss1SINuVVeS6e8FhlDHJfzZtYMeBfoAywCZgADnHNzKn7yEuXW5O7gnHvTzFoBbwDHAoOBZc654blfqLbOucsSDLUqpCW3ymtplNfixdUS3R9Y4Jx73zm3GhgH9Ivp3CVxzi12zr2Z214BzAU6UhPvmNxhY6hJlKQkt8pryZTXIsVViXYEPgq9XpQrq2pm1gnYC3gdaO+cW5zbtQRon1BY1SZ1uVVei6K8FkkPlupgZi2B8cBQ59zy8D5Xcw9E3RpSSHnNpiTzGlcl+jGwTej11rmyqmRmG1CTkLHOucdzxZ/m7r/4+zBLk4qvyqQmt8prSZTXIsVVic4AdjKzzma2IXAyMCmmc5fEzAx4AJjrnLs1tGsS4BdIPw2YuPZ7m6hU5FZ5LZnyWmwMcXW2N7O+wJ+BZsAo59z1sZy4RGbWA3gReAv4MVd8OTX3WR4DtgUWAv2dc8sSCbLKpCG3ymvplNciY9CIJRGRxtODJRGRCFSJiohEoEpURCQCVaIiIhGoEhURiUCVqIhIBKpERUQiUCUqIhLB/wOA2s4TjzPBwgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 9 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Plot images\n",
    "from keras.datasets import mnist\n",
    "from matplotlib import pyplot\n",
    "\n",
    "# load data\n",
    "(x_train, y_train), (x_test, y_test) = mnist.load_data()\n",
    "\n",
    "# create a grid of 3x3 images\n",
    "for i in range(0, 9):\n",
    "    pyplot.subplot(330 + 1 + i)\n",
    "    pyplot.imshow(x_train[i], cmap=pyplot.get_cmap('gray'))\n",
    "    \n",
    "# show the plot\n",
    "pyplot.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Random Rotations\n",
    "- As per Keras documentation random is 50%"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/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PTTT4HCYZ+6zmy33XYAXH755VGbLlxssskmgB+yP/bYY9Exl156KQDLli0rOJdRHrp1y+XAOOigg6J9qvGMGTMAmDhxIgDLl/ucEDqcP+usswD413/916ht1113BeD6668H4KmnnqpE140ECBcce/XqBcD69esBWLx4MQCrV69OvmN5zBI1DMOIQSYsUbUk27ZtC8DgwYOjthEjRgDe8jz33HMB+Pjjj6NjLrzwQgCOPPJIoNDiUUu2Pt/73vei7S222ALw1syECROitnXr1pX67xj1UKtCX8E70j/00EMAPPDAA0DhKOCVV14BvHX6n//5n1HbkCFDAP+9UJ3mzJlT/n/AiE242Nu1a1cAjjrqKAAuueSSqG2bbbYBvI5/+MMfALjpppuiYz7//PPKdrYeZokahmHEIBOW6O677w7AXnvtBcC4ceOith122AHwlqfOpY0ePTo65vzzzwf8UyycL1WLR9v078N5V30i6hzcV199FbXdcsstQPJPv1pC3ZDU2gR4++23AVi4MJcfo6F5aJ2//tOf/gRAhw4dorZf/epXABxzzDEAvP7660Ch61o159FaAzqCDK1MXZfYcccdAejfvz/gry3w17keIyIbvPfAgQMB+PDDDwF45JFHoralS5eW5x8oErNEDcMwYmA3UcMwjBg0O5wXkYnA8cBq59ye+X2dgHuAnsDbwDDn3MeNvUdcLrjgAgCGDRsGeHekkC+++ALwk9Lh8EAXhnQYv2jRoqjtpz/9KQDHHnssAPvtl8t8deCBB0bH6NC+U6dOBa/Q8FAjC6RBV0UXfe6///5o3+OPPw4UTp00x3333Rdt77zzzoDXV/Xs2bNndEytDufToq1Ow5166qkb7OvevTvgIwa32mqr6Bi93vTaaihdp7ZptNv2228ftaVxOH8bcEy9fRcDM5xzvYEZ+d+NbHEbpmutchumbWI0a4k6554RkZ71dp8IHJHfngQ8BVxUxn4VPJl0wUDjqEPUuf66664D/JMtdIPSCe4xY8YAMHv27KhNXSWee+45APr06QPAtddeGx3zrW99C/Dx9brQBN76Ues2K4741dK1KcLcBKW4jun34uCDD472HXLIIYD/7uj35O9//3vsfqadamurboOa/+DHP/5x1Lb55psX/T5ffvklAB999FG0r3379gBsueWWBe+n+WerQUtX57s451bkt1cCXRo70KoHZgrTtXYpSlvTtXRiuzg551xTZQRKrR6oVuPw4cOjfYcffjjgLcHQYrn66qsB72p00kknFbwP+LDAO++8E2g616RalGEIobreaJZ1da8A7+T7ne98B/AWT9Ypt65xUWtT57fBa6xWp86dA+y///6At1ReeOEFAN5///1KdzX1NKVtOXStH5KpFiV4PXQN48033wS8PgDz588HYMGCBYCf9wS4+OLcLISueej3QV2nqkFLV+dXiUhXgPxrbc7Qtz5M19rFtK0QLbVEHwRGAuPyrw80fXjx7LbbbgB8+9vfjvbp/KiuyGkiEIAXX3wR8Cv211xzDeDzT4Kf9wzDChtD5zTfeuutaF99yzX0Dth3332BhlcQM0jFdI2LOmDrqARg0KBBABx33HFAobO9flc0NFQTyoThwK2MxLTVUYN6VoSjBw2iePjhhwEfSj1v3rzoGPWa+OyzzwA4+uijo7YwGQl4nas5192sJSoidwEvAH1FpE5ERpETYrCILAGOzv9uZAjTtXYxbZOlmNX5UxppOqqR/UYGMF1rF9M2WVIXO3/llVcC3vkdNnRt+stf/hJtP/PMM4DP8KQx07NmzYqO0fjrUobcDeUjbcixXhe7rDBaZbniiisAv4AHXvOm3MrUaV+nZ6zES+XRz1jzFTz77LNR28yZMwG4+eabAR/73pAum266KVDovrT11lsD/nrTXAg6rVcNLOzTMAwjBqmzRI8//vhmjwktD93WieUbbrih7H1Sa7OpEM9iFq2MlqOhgJ988km0T/XQ4IlDDz00alOn7JNPPhmAW2+9FSh04q+RxcDUodeCWp1hcIsuFhVzvegC7tixYzfYp5aoBsmEC8lJY5aoYRhGDFJjieq8p84/NmQl6L6wrVLWxC677BJtq4tGQ2GnaglnJdwza+hnrlnrw8Qy6qA9d+5coDC5yNSpUwEfIPHv//7vgE9IAq0jBLSa6DURjh5KQfOQaih3iFYzmD59OlB4bSZ9LZolahiGEQO7iRqGYcQgNcN5dVfR4XlT5SAquYij0wk6/AOfo7Shofsf//jHivXF8J+1urWF7m31CSPZVD91cdLMW507d46OqaurK29njbKgpXq03HWY+UmnYCZNmgT4SKdqLuyaJWoYhhGD1FiiOjGssbVapCpErVR1wgX/lNInVEsnlfX8arGETt1qnerT7t57743a/uM//qNF5zPKT+iwrQUINZOQWjcnnHBCdEwl3OGM+PTu3RvwFSTCjGwvvfQSAE8++SQAa9euTbh3G2KWqGEYRgxSY4mq86y6oNx1111Rm2bK1ifS97///ahN66lo2dyGQjzrz2WGTvNa62WfffYBYMKECYC3XBrqo7rUQOE8nBGP0OJQ53q1/osJq21Ic80I1KtXL6Cw4oFZoukhHF1qVq69994bKCxHPm3aNABefvllIB1hvGaJGoZhxCA1lqhaDmpZap5BgCOPPBLwIV9aXwW8E/Z5550H+AQm4dyoPq10n3oCAIwaNQrwTtn6RAytVf27d955B4DXXnttgzajdDQ0c8899wS85QHeKtUkFmp5hHNg9T/7MM9r//79C95bNdcQXiNdhNU61ble9QxHfq+++irgM+OngWLyifYQkZki8pqILBSR0fn9nURkuogsyb92bO69jPRgutYmpmvyFDOcXw9c4JzrBxwEnCMi/bASrFnHdK1NTNeEKSYp8wpgRX57nYgsArpR5hKsOjTTbCy//vWvozZdZNDSxeEChA67tVDV+PHjGz2HujGFjrn69/UzNIWLFCtXrgTgooty/97TTz9d1P+UZpLStSl0CPejH/0IgNNOOy1q02kVzQA0ZcoUwGftAVi1ahXgY6yHDBkStel7av5JjbVW15haJQ26loIuGmthQfDZuHTIHuYGfuKJJxLsXXGUNEGUr2U9AHgJK8FaM5iutYnpmgxF30RFpD0wFRjjnFsbWm7lLMGqi0C6kAAwevRoAG688Uag0BFfLVC1VrVf4aJD/exLDWVjUhcaXbgIC5qNGTMG8FaMFuCqBZLStSG0lK66sISLBZo5S60SLUoXFhDU3KB9+vQB/HcA/GhFz6HWTLhgWctUU9dS0MVF1Re826GGdP7mN7+pdDdiUZSLk4i0JSfIZOfctPxuK8GacUzX2sR0TZZmLVHJPcJuARY5564NmipagjW0JNXNRUMx1eUJYM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wzCMSmNrCBzcAAAOAklEQVQ3UcMwjBjU3MLS9ttvD8A111wT7evRIxcuvG7dOgAefvjhqO299wrDwrt1y+Wd/cEPfhDt22uvvQCYNCmXKPu///u/o7YbbrihbH03NkRdWkaPHg3AEUccEbXpsO/b3/42AF9/7ZMO6XB+441zX/F777234n01Wo5qCfDDH/4QgFtvvbXZv9tll10Af91CWYfzRWGWqGEYRgwyb4mqpXHAAQcA3jLcfffdo2PUfen1118H4Be/+EXU9vbbbxe8n1qyoYvU0KG58iy6kHHWWWdFbWaJVoZNN90U8IsLam2+/PLL0TG6wDdw4EDAfxcA+vXLJWwfPHgwAM8++ywAK1eurGS3jRJp37494N0PAf7v//6v4JjPP/882laN9frUIJnttttug2OSckU0S9QwDCMGmbREQ4tDrZAbb7wR8BZoOD+mc6BqQa5Zs6bR9/7ggw8AGDduXLRvt912A7x1o1YSwJZbbgkUutcY8dEgiJNPPhnwYbjh3OZ9990H+CCI/v37R2377LMPAPPnzwea1txIHrVAf/KTnwAwfvz4DY556623AD+/DbDttrlE83vssQcAbdq0AbxFChu6K1Yas0QNwzBi0OxNVEQmishqEVkQ7OskItNFZEn+tWNlu2mUG9O1djFtk6WY4fxtwP8Dbg/2XQzMcM6Ny9euvhi4qPzda5itttoq2r7++usBP4zXmOkw9v33v/89UNyQThehFi1aFO1T16arrroK8ItPAKeffnpBPzLEbaRM1xAdmusw7f333wegrq4uOkYXiTTqTiOXAF555ZWCts022wyAgw46KDpGo6HUJebdd8My65nmNlKqbYcOHQAfYRS6IipvvvkmAI8//jhQ6Op09dVXA/570bFj7lmgi77gtf7ss8/K2fVGadYSdc49A9S/+5wITMpvTwKGlrlfRoUxXWsX0zZZWrqw1MU5tyK/vRLoUqb+NIk+Yc4911d41QxNGuuuiz4nnujLaS9fnivad/PNNxd9rjALkC5gaKaY3r19zb1/+Zd/ATJpiTZEVXRtCLUiunTJdUEX7kKn6vp5HzbZZJNoe9999wXgkEMOAbxOobvMjBkzAJg1a1ZZ+55SEtd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JEndRLsB7wa/1+X3pRoR6QkMAF4CujjnVuSbVgJdqtSttJE5bU3XojBdi8QWlhpBRNoDU4ExzrmCEqAuNwdibg0ZxHStTaqpa1I30feAHsHv3fP7UomItCUnyGTn3LT87lX5+Redh1ldrf6ljMxoa7qWhOlaJEndRGcBvUWkl4i0A4YDDyZ07pKQXFrtW4BFzrlrg6YHgZH57ZHAA0n3LaVkQlvTtWRM12L7kJSzvYgcC1wHtAEmOueuTOTEJSIihwLPAq8CWlt5LLl5linAjsByYJhzbk1VOpkysqCt6Vo6pmuRfbCIJcMwjJZjC0uGYRgxsJuoYRhGDOwmahiGEQO7iRqGYcTAbqKGYRgxsJuoYRhGDOwmahiGEQO7iRqGYcTg/wMw+ACLbsGsQwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 9 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from keras.datasets import mnist\n",
    "from keras.preprocessing.image import ImageDataGenerator\n",
    "from matplotlib import pyplot\n",
    "from keras import backend as K\n",
    "\n",
    "# Load data\n",
    "(x_train, y_train), (x_test, y_test) = mnist.load_data()\n",
    "\n",
    "# Reshape our data to be in the forma [samples, width, height, color_depth]\n",
    "x_train = x_train.reshape(x_train.shape[0], 28, 28, 1)\n",
    "x_test = x_test.reshape(x_test.shape[0], 28, 28, 1)\n",
    "\n",
    "# Change datatype to float32\n",
    "x_train = x_train.astype('float32')\n",
    "x_test = x_test.astype('float32')\n",
    "\n",
    "# Create our image generator\n",
    "# Define random rotation parameter to be 60 degrees\n",
    "train_datagen = ImageDataGenerator(rotation_range=60)\n",
    "\n",
    "# fit parameters from data\n",
    "train_datagen.fit(x_train)\n",
    "\n",
    "# configure batch size and retrieve one batch of images\n",
    "for x_batch, y_batch in train_datagen.flow(x_train, y_train, batch_size=9):\n",
    "    # create a grid of 3x3 images\n",
    "    for i in range(0, 9):\n",
    "        pyplot.subplot(330 + 1 + i)\n",
    "        pyplot.imshow(x_batch[i].reshape(28, 28), cmap=pyplot.get_cmap('gray'))# show the plot\n",
    "    pyplot.show()\n",
    "    break"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Randon Shearing and zooming"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAVEAAAD8CAYAAADOg5fGAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4wLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvqOYd8AAAIABJREFUeJztnXm0FNXVt58tg4I4MCgig6DggKhBEZwnRE0iUSMiqIkzSdREk5iExDe+X+IQk2hW3rWSpSFLIjEqkoDzFEREjYooKgooIIpeZBABxZGg5/uje1edvvS9t7uru7qq7n7+6bp1qrvP7V/X6X322Wdvcc5hGIZhVMYW9e6AYRhGmrFB1DAMIwI2iBqGYUTABlHDMIwI2CBqGIYRARtEDcMwImCDqGEYRgQiDaIicoKIvC4iS0RkfLU6ZdQX0zW7mLbVRyoNtheRNsAiYATQAMwBxjrnFlSve0bcmK7ZxbStDW0jPHcosMQ5txRARCYDJwFNCiIirX171Brn3A717kQLmK7lkwZdoUxtTdfSdI0yne8JvOP93ZA/ZzTNsnp3oARM1/JJg65g2pZLSbpGsURLQkTGAeNq/T5GvJiu2cR0LZ8og+hyoLf3d6/8uQKccxOACWDTg5RgumaXFrU1XcsnynR+DjBARPqJSHtgDHBvdbpl1BHTNbuYtjWgYkvUObdJRC4BHgHaABOdc/Or1jOjLpiu2cW0rQ0VhzhV9GY2PXjBOTek3p2oNqar6ZpRStLVdiwZhmFEwAZRwzCMCNggahiGEQEbRA3DMCJQ82B7w4iCiACw8847A7D99tsHbf/9738BWLlyJQAbNmwI2qwAoxEXZokahmFEwAZRwzCMCGR2Ot+z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rpSka82zOInIOGAc8EWt3ysFLKt3B6qFp6thulaVDh06ALDLLrkkSsOHDw/afvSjHwEwdepUAC6//PJadqUkXaMMoiWZ+865CeS3YFnNllRgumaXFrWNW9cdd9wRgMGDBwfnevToAcCAAQMAGDFiRNDWq1cvAIYNG1brrpVMFJ/oHGCAiPQTkfbAGODe6nTLqCOma3YxbWtAxZaoc26TiFwCPAK0ASY65+ZXrWdGXTBds4tpWxusZHK8WGndiPiLDF//+tcB6Nu3LwDt2rUL2t55JxfiOG1abrH2gw8+qGW3TNcyadOmDQCee6A+AAANR0lEQVTf+MY3APjjH/8YtPXp06fg2i+//DI41vFKn6+ab9q0qRbdtJLJhmEYtSbuGkuGURH9+/cH4OCDDw7OXXjhhQD07p1bK2nbNvw6v/feewC8+eabADz++ONxdNMoEZ09/PCHPwRgp512Ctoaz47ffffd4Hj9+vUA7L333gAMGZIzFJ999tma9bUlzBI1DMOIgFmiRio477zzAPjxj38cnJs3bx4A06dPB2CrrbYK2o4//ngAjjrqKMAs0aTRtWtXIJxFaGA9hP7r2bNnA3DrrbcGbRr2pJbsCSecAJglahiGkVrMEjUSjfo5dfX10UcfDdrOP/98AD7//HMg3OECcMQRRwBw++23x9JPozw+/DCXI2TWrFkALF68OGhTH+gjjzwCwB133BG0nXjiiQBs3LgRgEGDBtW+sy1glqhhGEYEbBA1DMOIQGan87vttltwvO+++wJhGMVJJ4XZvzRjjAb03nzzzQDcfffdwTX//W9rT1JUP774Ipe3ZvLkyQDcf//9QdvKlSsLrv3lL38ZHOuU8O233651F40KeO211wC48sorgcJNFKtXry54LEaSqhSbJWoYhhGBzFiianl+7WtfA8LtZBAuOGiKLc0E46O/bP365VKerlq1Kmh74oknatBjoxRUlwULNq+Pplv+hg4dCoThLhBarp999lmtu2hEYMWKXAUP/34rZQuniNSsT+VilqhhGEYEUmmJanZrgDFjxgAwatQoAHr2zNXSWr48TJM4YcIEAF5++WWg0Mep1sy5554LwMiRIwFYu3ZtTfpuVI899tgDCEOd3n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d1L+sknkhDJSoq3pWjama4nENYj2BN7x/m7In0s0ItIXGAzMBro75zTr70qge526lTRSp63pWhKma4nYwlITiEgnYCpwmXPuQ7/N5XwgFtaQQkzXbFJPXeMaRJcDvb2/e+XPJRIRaUdOkNucc9Pyp1fl/S/qh6lJ/ZAUkhptTdeyMF1LJK5BdA4wQET6iUh7YAxwb0zvXRaSKy95M7DQOfcHr+le4Oz88dnAPXH3LaGkQlvTtWxM11L7EFewvYh8Dfgj0AaY6Jy7JpY3LhMROQx4EngF0DqsvyDnZ5kC9AGWAaOdc2vr0smEkQZtTdfyMV1L7IPtWDIMw6gcW1gyDMOIgA2ihmEYEbBB1DAMIwI2iBqGYUTABlHDMIwI2CBqGIYRARtEDcMwImCDqGEYRgT+PzAtVjzLicUMAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 9 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from keras.datasets import mnist\n",
    "from keras.preprocessing.image import ImageDataGenerator\n",
    "from matplotlib import pyplot\n",
    "from keras import backend as K\n",
    "\n",
    "# Load data\n",
    "(x_train, y_train), (x_test, y_test) = mnist.load_data()\n",
    "\n",
    "# Reshape our data to be in the forma [samples, width, height, color_depth]\n",
    "x_train = x_train.reshape(x_train.shape[0], 28, 28, 1)\n",
    "x_test = x_test.reshape(x_test.shape[0], 28, 28, 1)\n",
    "\n",
    "# Change datatype to float32\n",
    "x_train = x_train.astype('float32')\n",
    "x_test = x_test.astype('float32')\n",
    "\n",
    "# Create our image generator\n",
    "# Define shearing and zooming parameters to be 0.5 each\n",
    "train_datagen = ImageDataGenerator(shear_range=0.5,\n",
    "                                   zoom_range=0.5)\n",
    "\n",
    "# fit parameters from data\n",
    "train_datagen.fit(x_train)\n",
    "\n",
    "# configure batch size and retrieve one batch of images\n",
    "for x_batch, y_batch in train_datagen.flow(x_train, y_train, batch_size=9):\n",
    "    # create a grid of 3x3 images\n",
    "    for i in range(0, 9):\n",
    "        pyplot.subplot(330 + 1 + i)\n",
    "        pyplot.imshow(x_batch[i].reshape(28, 28), cmap=pyplot.get_cmap('gray'))# show the plot\n",
    "    pyplot.show()\n",
    "    break"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Horizontal and Vertical Flips"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAVEAAAD8CAYAAADOg5fGAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4wLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvqOYd8AAAIABJREFUeJzt3XvcVWP+//HXR9KgqBySRCJDg5GhQZiMU+bh0JivCDmMn/M4H2qcB/PQfJFxppEKDZUYKcQ0UmYmUk5TDaVvKToqRE5x/f7Y+1p77+7T2vfae6299v1+Ph499tprrb3Xx/1xX/d1rXUdzDmHiIg0znpJByAikmYqREVEIlAhKiISgQpREZEIVIiKiESgQlREJAIVoiIiEUQqRM2sl5m9Z2ZzzWxAqYKSZCmv1Uu5LT1rbGd7M2sGvA8cCiwCpgF9nXOzSheexE15rV7KbXmsH+Gz3YG5zrl5AGb2BHAMUGdCzKypD49a4ZzbIukgGqC8Fi8NeYUic6u8hstrlOZ8B2Bh3vtF2X1StwVJBxCC8lq8NOQVlNtihcprlJpoKGZ2FnBWua8j8VJeq5PyWrwohehHQMe899tk9xVwzg0GBoOaBymhvFavBnOrvBYvSnN+GtDFzLY3sw2AE4CxpQlLEqS8Vi/ltgwaXRN1zq01s98BE4BmwMPOuZkli6wMWrZsCcC4ceOCfQcccEDBOT169ABg6tSp8QVWQdKYVwlHuS2PSPdEnXPPAc+VKBapEMpr9VJuS6/sD5YqyaabbgoU1j7X7Se7xx57AE23JioixdGwTxGRCJpUTTQMX0t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AbBw4cJEYqowFZtX34E6f6DE5ZdfXnBO/kQTG220EVDYCbuJq4jcXnTRRUDu927FihUA9O/fuNuzfsjwF198UYLoGqfBmqiZPQ78G/ixmS0yszPIJOJQM5sDHJJ9LymivFYv5TZeYZ7O963j0MEljkVipLxWL+U2Xk1i7Lznb0bXNnZeKtt3330H5GZXgtxtmcsuu6zG+X4mn2nTpgG5rlISv0suuSTYPuuswgf/p512GgDPP/98nZ8/8sgjg20/z6wfFHPyySeXKsxG07BPEZEImlRNVNLP10gh17XJtyzyuz9tueWWADzxxBMA7LXXXoCWQI5Tp06dgMLap58H1KttEMW68j+z4YYbAvDJJ58AudnXkqSaqIhIBKmsifpaBkCLFi0Kjvlld32nXICddtopnsAkEQMG1BwGfsUVVwC5NZL8UtgXX3xxcM5XX30VQ3RN11ZbbQXU/vvn10b66KOP6vy8H9bru0NBrtUxbty4Ws+F8OtwlYpqoiIiEagQFRGJIFXNeT9Lz5lnnhnsa9++PZAbjaQuS01XfrPezzu67pK6+c3AZ599Nsbomq7afif97ZW77rqr4D3AZ599BsCtt94K1N4l8frrrwdyS/7kLxfy6KOPArkucOeff34J/ivqppqoiEgEFVMT9TXKE044ocax2267rcHP+786YZZAzh877zsC+7G3gwcPBnKzw0g6Pf300wB069YNgO233x4oHG//0ksvAbnlmKW0/O9U/lLYe+65J5CrQfqapR8c0RDftemCCy4AYMGCBQCMGDEiOMe3Sv24/HJTTVREJAKL8x5iffMT+vtTRxxxhD83OBYmxmLuidb33fvvvz8AU6dObfB7GmG6c26vcnxxkho77+TGG28M5IZy+pmXAG666SYAli9fHim2Cy+8EMgtwZzPz46+dOnSSNdAea1Xfl5/9atfNXi+X+L83nvv9XEEx/wQ0PqGiZZQqLyqJioiEkHF3BMNsw6S95///CfY9n+1/BpJkyZNqnH+73//e6BwIgNJnu8Qv+68oAA9e/YEcoMm5s+f36hr+I7XtbVQzj33XABuuOGGRn23hLNmzZpg+8knn2zw/I4dO9Z5LMww0biFmU+0o5m9bGazzGym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QhUiIqIRNDg2PmSXqyCZ3GKScWMsS4l5VV5rVKh8qqaqIhIBHE/WFoBfJl9TZvNiR73dqUIpAIpr9VJeQ0h1uY8gJm9kcamT1rjjktafz5pjTsuaf35xBm3mvMiIhGoEBURiSCJQnRwAtcshbTGHZe0/nzSGndc0vrziS3u2O+JiohUEzXnRUQiiK0QNbNeZvaemc01swFxXbdYZtbRzF42s1lmNtPMLsrub2tmL5nZnOxrm6RjrRRpyK3yWjzlNWQMcTTnzawZ8D5wKLAImAb0dc7NKvvFi5Rdk7u9c26GmbUCpgO9gdOAlc65gdn/odo45/onGGpFSEtuldfiKK/hxVUT7Q7Mdc7Nc859CzwBHBPTtYvinFvsnJuR3V4NzAY6kIl3ePa04WQSJSnJrfJaNOU1pLgK0Q7Awrz3i7L7KpqZdQK6kVmzu51zbnH20BKgXUJhVZrU5VZ5DUV5DUkPlupgZi2BMcDFzrnP84+5zD0QdWtIIeW1OiWZ17gK0Y+Ajnnvt8nuq0hm1pxMQkY4557K7l6avf/i78MsSyq+CpOa3CqvRVFeQ4qrEJ0GdDGz7c1sA+AEoCKnlLfMEpJDgNnOuUF5h8YCp2a3TwWeiTu2CpWK3CqvRVNew8YQV2d7M/sV8GegGfCwc+6PsVy4SGa2PzAFeBf4Ibv7KjL3WUYB2wILgD7OuZWJBFlh0pBb5bV4ymvIGDRiSUSk8fRgSUQkAhWiIiIRqBAVEYlAhaiISAQqREVEIlAhKiISgQpREZEIVIiKiETw/wGxrkTGDNsJ/QAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 9 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from keras.datasets import mnist\n",
    "from keras.preprocessing.image import ImageDataGenerator\n",
    "from matplotlib import pyplot\n",
    "from keras import backend as K\n",
    "\n",
    "# Load data\n",
    "(x_train, y_train), (x_test, y_test) = mnist.load_data()\n",
    "\n",
    "# Reshape our data to be in the forma [samples, width, height, color_depth]\n",
    "x_train = x_train.reshape(x_train.shape[0], 28, 28, 1)\n",
    "x_test = x_test.reshape(x_test.shape[0], 28, 28, 1)\n",
    "\n",
    "# Change datatype to float32\n",
    "x_train = x_train.astype('float32')\n",
    "x_test = x_test.astype('float32')\n",
    "\n",
    "# define data preparation\n",
    "train_datagen = ImageDataGenerator(vertical_flip=True,\n",
    "                                   horizontal_flip=True)\n",
    "\n",
    "# fit parameters from data\n",
    "train_datagen.fit(x_train)\n",
    "\n",
    "# configure batch size and retrieve one batch of images\n",
    "for x_batch, y_batch in train_datagen.flow(x_train, y_train, batch_size=9):\n",
    "    # create a grid of 3x3 images\n",
    "    for i in range(0, 9):\n",
    "        pyplot.subplot(330 + 1 + i)\n",
    "        pyplot.imshow(x_batch[i].reshape(28, 28), cmap=pyplot.get_cmap('gray'))# show the plot\n",
    "    pyplot.show()\n",
    "    break"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Random Shifts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAVEAAAD8CAYAAADOg5fGAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4wLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvqOYd8AAAIABJREFUeJztnX24VGW5/z+3IKiACqKAiIFJFiqpKJpaelLwJV+wzMBT0ZWmlnnwpFci56hdVicsw7DMLkvTTFNMSTI7SsavxIxXOaKiggiK8aIi8uIr+Pz+mLnXWrPZsGf2mlkza/h+rmtfe83zrD3r3vOdWXM/z3M/920hBIQQQrSP7eptgBBC5BndRIUQIgW6iQohRAp0ExVCiBToJiqEECnQTVQIIVKgm6gQQqQg1U3UzE40s+fMbJGZja2WUaK+SNfmRdpWH2tvsL2ZdQCeB4YBy4BZwKgQwj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I1zJt0I4lIYRoP1pYEkKIFOgmKoQQKdBNVAghUqCbqBBCpEA3USGESIFuokIIkQLdRIUQIgW6iQohRAr+P+RCW6nkUvwqAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 9 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from keras.datasets import mnist\n",
    "from keras.preprocessing.image import ImageDataGenerator\n",
    "from matplotlib import pyplot\n",
    "from keras import backend as K\n",
    "\n",
    "# Load data\n",
    "(x_train, y_train), (x_test, y_test) = mnist.load_data()\n",
    "\n",
    "# Reshape our data to be in the forma [samples, width, height, color_depth]\n",
    "x_train = x_train.reshape(x_train.shape[0], 28, 28, 1)\n",
    "x_test = x_test.reshape(x_test.shape[0], 28, 28, 1)\n",
    "\n",
    "# Change datatype to float32\n",
    "x_train = x_train.astype('float32')\n",
    "x_test = x_test.astype('float32')\n",
    "\n",
    "# define data preparation\n",
    "train_datagen = ImageDataGenerator(width_shift_range=0.3,\n",
    "                                   height_shift_range=0.3)\n",
    "\n",
    "# fit parameters from data\n",
    "train_datagen.fit(x_train)\n",
    "\n",
    "# configure batch size and retrieve one batch of images\n",
    "for x_batch, y_batch in train_datagen.flow(x_train, y_train, batch_size=9):\n",
    "    # create a grid of 3x3 images\n",
    "    for i in range(0, 9):\n",
    "        pyplot.subplot(330 + 1 + i)\n",
    "        pyplot.imshow(x_batch[i].reshape(28, 28), cmap=pyplot.get_cmap('gray'))# show the plot\n",
    "    pyplot.show()\n",
    "    break"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Applying all at once"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAVEAAAD8CAYAAADOg5fGAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUA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duSRRwLw/e9/H4D99tsPgN122y3qs8UWWwDwySef1GTseadr164MGDCAv/u7v4uuubeEv+duubRmSY4fH3vbbLJJ4e/7q6++CsD//u//AqVeE6J+HHDAAQBccMEFAHzve9+L2lyj//mf/wFgzJgxUZt/T5vpfEGWqBBCpECTqBBCpKBplvNOa0vupUuXljwC9O7dG4Att9wSiOPr/cAKYrcpLedbZtttt2Xo0KGcd9550bXZs2cDMHbsWAD+8pe/APDBBx9EfXzL5Bvf+AYA/fv3j9r69i1EJx5zzDFArNM111wT9Um6sYls8OxofkDowS7JgJS9994biJf6y5cvj9puvfVWAFatWlX7wWaELFEhhEhB01mireFp8dzdBuCHP/whAF/60pdK+r7//vvR86RbjtiQTp06sc0227B48eLo2owZhRSVEyYUgmM8rDZ5oPDUU08BcOeddwKlwRDuYuaWp7s47bDDDlGfv/71r1X9PUTbuH5+eHTjjTcCcPDBB0d9PGClT59Clr3kodMDDzwAxN+p5Iovr8gSFUKIFHQIS9T3Ob/5zW8CcOGFF0Ztxx9/PADr1q0D4OWXXwZg0qRJUR9Zoq2zfPly7r333pLELscee2xJn3ffLeQCTlqr7qDte5sLFiyI2v7whz8AsdvThx9+WIORi/bie6AeMPGf//mfUduVV14JxPvYbpEm2376058CpfuleUWWqBBCpECTqBBCpKDN5byZjQFOAZaEEPYrXusB3Av0B94GzgohrNjYa2SJuyrtscce0TV3vfHlfNKVxl02pkyZAsT5RGfOnFnzsdaTaur66aefMn36dG655ZbomkcmnX766UAcC3///fdHfV544QUgzm2QdH/yAwct4ysny+/skiVLgDg6CeLv3qWXXgpA9+7dozbfNvOowY6ynL8dGLLetZHA4yGEPYHHiz+LfHE70rVZuR1pmxltWqIhhKfNrP96l4cCg4rPxwJPAiOqOK5WcQdfiGOzjzvuOCCO6R0yJP4MeTy8u2ckyyk/++yzAFx//fVAfKDU7NmCqqnrunXrWLlyZeSyBLELjMfM+yrACwlCnB3LDyd8NQCxS5RbKqtXrwZKD59Ey9TjO+v6QHxg6N+hpFub56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USGESEE9JtHRdbhnNcjruLMir+9PXsedFXl9fzIbd+Z7okII0UxoOS+EECnIbBI1syFmNsvM5prZyKzuWylm1tfMJpnZDDObbmY/KF7vYWYTzWxO8bF7W6/VUciDttK1cqRrmWPIYjlvZp2A2cBgYAEwBTg7hDCj5jevkGJN7t4hhGlmthUwFTgNOB9YHkIYVfxAdQ8hjKjjUBuCvGgrXStDupZPVpbo4cDcEMK8EMIa4B5gaEb3rogQwsIQwrTi81XATKAPhfGOLXYbS0EokRNtpWvFSNcyyWoS7QMks6YuKF5raMysP3AQMBnoFULwgN9FQK86DavRyJ220rUspGuZ6GBpI5hZN2AccEUI4cNkWyjsgcitIYdI1+aknrpmNYm+B/RN/Lxz8VpDYmadKQhydwjh/uLlxcX9F9+HWVKv8TUYudFWulaEdC2TrCbRKcCeZrarmXUBhgHjM7p3RVih1OCtwMwQwvWJpvHA8OLz4cCDWY+tQcmFttK1YqRruWPIytnezE4GbgA6AWNCCD/P5MYVYmbHAM8ArwFfFC9fQ2Gf5T5gF2A+cFYIYXldBtlg5EFb6Vo50rXMMShiSQgh2o8OloQQIgWaRIUQIgWaRIUQIgWaRIUQIgWaRIUQIgWaRIUQIgWaRIUQIgWaRIUQIgX/H5SiKJwkZ0mCAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 9 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from keras.datasets import mnist\n",
    "from keras.preprocessing.image import ImageDataGenerator\n",
    "from matplotlib import pyplot\n",
    "from keras import backend as K\n",
    "\n",
    "# Load data\n",
    "(x_train, y_train), (x_test, y_test) = mnist.load_data()\n",
    "\n",
    "# Reshape our data to be in the forma [samples, width, height, color_depth]\n",
    "x_train = x_train.reshape(x_train.shape[0], 28, 28, 1)\n",
    "x_test = x_test.reshape(x_test.shape[0], 28, 28, 1)\n",
    "\n",
    "# Change datatype to float32\n",
    "x_train = x_train.astype('float32')\n",
    "x_test = x_test.astype('float32')\n",
    "\n",
    "# define data preparation\n",
    "train_datagen = ImageDataGenerator(\n",
    "        rotation_range=45,\n",
    "        width_shift_range=0.2,\n",
    "        height_shift_range=0.2,\n",
    "        shear_range=0.2,\n",
    "        zoom_range=0.2,\n",
    "        horizontal_flip=True,\n",
    "        fill_mode='nearest')\n",
    "\n",
    "# fit parameters from data\n",
    "train_datagen.fit(x_train)\n",
    "\n",
    "# configure batch size and retrieve one batch of images\n",
    "for x_batch, y_batch in train_datagen.flow(x_train, y_train, batch_size=9):\n",
    "    # create a grid of 3x3 images\n",
    "    for i in range(0, 9):\n",
    "        pyplot.subplot(330 + 1 + i)\n",
    "        pyplot.imshow(x_batch[i].reshape(28, 28), cmap=pyplot.get_cmap('gray'))# show the plot\n",
    "    pyplot.show()\n",
    "    break\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Read more about it at the official Keras Documentation\n",
    "https://keras.io/preprocessing/image/"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Test Augmentation on a single image\n",
    "- Outputs to ./preview diretory"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "from keras.preprocessing.image import ImageDataGenerator, img_to_array, load_img\n",
    "\n",
    "datagen = ImageDataGenerator(\n",
    "        rotation_range=40,\n",
    "        width_shift_range=0.2,\n",
    "        height_shift_range=0.2,\n",
    "        shear_range=0.2,\n",
    "        zoom_range=0.2,\n",
    "        horizontal_flip=True,\n",
    "        fill_mode='nearest')\n",
    "\n",
    "img = load_img('dog.jpeg')  \n",
    "x = img_to_array(img)  # creating a Numpy array with shape (3, 150, 150)\n",
    "x = x.reshape((1,) + x.shape)  # converting to a Numpy array with shape (1, 3, 150, 150)\n",
    "\n",
    "i = 0\n",
    "for batch in datagen.flow(x, save_to_dir='output', save_prefix='dog', save_format='jpeg'):\n",
    "    i += 1\n",
    "    if i > 35:\n",
    "        break "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
